﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Client
{
    public partial class Form2 : Form
    {
        public string hang, thoigiandi, thoigianden, diemdi, diemden, gia, chuyenbay;
        public string hangkh, thoigiandikh, thoigiandenkh, diemdikh, diemdenkh, giakh, chuyenbaykh;
        public string hang3, thoigiandi3, thoigianden3, diemdi3, diemden3, gia3, chuyenbay3;
        public int flag;
        public Form2()
        {
            InitializeComponent();            
        }

        private void Form2_Load(object sender, EventArgs e)
        {
            this.textBox1.Text = hang;
            this.textBox2.Text = thoigiandi;
            this.textBox3.Text = thoigianden;
            this.textBox4.Text = diemdi;
            this.textBox5.Text = diemden;
            this.textBox6.Text = gia;
            this.textBox7.Text = chuyenbay;

            this.textBox14.Text = hangkh;
            this.textBox13.Text = thoigiandikh;
            this.textBox12.Text = thoigiandenkh;
            this.textBox11.Text = diemdikh;
            this.textBox10.Text = diemdenkh;
            this.textBox9.Text = giakh;
            this.textBox8.Text = chuyenbaykh;

            this.textBox21.Text = hang3;
            this.textBox20.Text = thoigiandi3;
            this.textBox19.Text = thoigianden3;
            this.textBox18.Text = diemdi3;
            this.textBox17.Text = diemden3;
            this.textBox16.Text = gia3;
            this.textBox15.Text = chuyenbay3;

            if (flag == 0)
            {
                this.textBox14.Visible = false;
                this.textBox13.Visible = false;
                this.textBox12.Visible = false;
                this.textBox11.Visible = false;
                this.textBox10.Visible = false;
                this.textBox9.Visible = false;
                this.textBox8.Visible = false;

                this.textBox21.Visible = false;
                this.textBox20.Visible = false;
                this.textBox19.Visible = false;
                this.textBox18.Visible = false;
                this.textBox17.Visible = false;
                this.textBox16.Visible = false;
                this.textBox15.Visible = false;

                this.label9.Visible = false;
                this.label10.Visible = false;
                this.label11.Visible = false;
                this.label12.Visible = false;
                this.label13.Visible = false;
                this.label14.Visible = false;
                this.label15.Visible = false;
                this.label16.Visible = false;

                this.label24.Visible = false;
                this.label23.Visible = false;
                this.label22.Visible = false;
                this.label21.Visible = false;
                this.label20.Visible = false;
                this.label19.Visible = false;
                this.label18.Visible = false;
                this.label17.Visible = false;
                this.ClientSize = new System.Drawing.Size(259, 262);
            }
            if (flag == 1)
            {
                this.textBox21.Visible = false;
                this.textBox20.Visible = false;
                this.textBox19.Visible = false;
                this.textBox18.Visible = false;
                this.textBox17.Visible = false;
                this.textBox16.Visible = false;
                this.textBox15.Visible = false;

                this.label24.Visible = false;
                this.label23.Visible = false;
                this.label22.Visible = false;
                this.label21.Visible = false;
                this.label20.Visible = false;
                this.label19.Visible = false;
                this.label18.Visible = false;
                this.label17.Visible = false;                
                
                this.ClientSize = new System.Drawing.Size(502, 262);
            }
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {            
            this.Close();
        }

        private void buttonMua_Click(object sender, EventArgs e)
        {

        }

        private void Form2_FormClosed(object sender, FormClosedEventArgs e)
        {
            
        }        
    }
}
